<div class="toolbar">
  <div class="group">
    <form class="ant-advanced-search-form">
      <div nz-row [nzGutter]="24" style="width: 700px;">
        <nz-col [nzSpan]="8">
          <nz-form-item>
            <nz-form-label nzFor="deviceSelect">被测设备</nz-form-label>
            <nz-form-control>
              <nz-select [(ngModel)]="queryData.device" [attr.id]="'deviceSelect'" name="deviceSelect" nzShowSearch nzAllowClear nzPlaceHolder="选择设备" nzSize="small" style="width: 130px;">
                <nz-option *ngFor="let item of deviceList| async" [nzLabel]="item" [nzValue]="item"></nz-option>
              </nz-select>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="12">
          <nz-form-item style="width: 400px">
            <nz-form-label nzFor="testTime">测试日期</nz-form-label>
            <nz-form-control>
              <nz-range-picker nzSize="small" [(ngModel)]="queryData.testTime" name="testTime" [attr.id]="'testTime'"></nz-range-picker>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="8">
          <nz-form-item>
            <nz-form-label nzFor="testUser">测试人员</nz-form-label>
            <nz-form-control>
              <input nz-input nzSize="small" [(ngModel)]="queryData.testUser" name="testUser" id="testUser" style="width: 130px;">
            </nz-form-control>
          </nz-form-item>
        </nz-col>
        <nz-col [nzSpan]="8">
          <nz-form-item>
            <nz-form-label nzFor="status">测试状态</nz-form-label>
            <nz-form-control>
              <nz-select [(ngModel)]="queryData.status" [attr.id]="'status'" name="status" nzShowSearch nzAllowClear nzSize="small" style="width: 130px;">
                <nz-option *ngFor="let item of ['进行中','已完成','暂停中','已终止']" [nzLabel]="item" [nzValue]="item"></nz-option>
              </nz-select>
            </nz-form-control>
          </nz-form-item>
        </nz-col>
      </div>
    </form>
  </div>
  <div class="group">
    <div class="search-area pl-3">
      <button nz-button [nzType]="'primary'" (click)="search()">搜索</button>
    </div>
  </div>

</div>
<div class="main-wrapper">
  <div class="main">
    <div class="table-responsive bg-white">
      <table class="table table-hover table-striped">
        <thead class="">
        <tr>
          <th>被测设备</th>
          <th>测试日期</th>
          <th>测试人员</th>
          <th>测试状态</th>
          <th>测试描述</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <ng-container *ngFor="let data of dataList |async">
          <tr>
            <td>{{data.device}}</td>
            <td>{{data.testTime}}</td>
            <td>{{data.testUser}}</td>
            <td [style]="{color:getStatusColor(data.status)}">{{data.status}}</td>
            <td>{{data.desc}}</td>
            <td><a nz-button nzType="link" (click)="viewReport(data)">查看</a></td>
          </tr>
        </ng-container>
        </tbody>

      </table>
      <small class="form-inline">
        <nz-pagination [nzTotal]="pageData.listSize" (nzPageIndexChange)="pageData.pageChange($event)"></nz-pagination>
        <label>共{{pageData.listSize}}条记录</label>
      </small>

    </div>
  </div>
</div>
